/**

 */
@isTest
private class Ctrl_WorkOrderAttachment_Test {

    static testMethod void myUnitTest() {
    	Account acc=new Account();
    	acc.Name='Test1229J';
    	insert acc;
    	
    	Case cas=new Case();
    	cas.AccountId=acc.Id;
    	insert cas;
    	
    	WorkOrder__c wo=new WorkOrder__c();
    	wo.Case__c=cas.Id;
    	wo.Account__c=acc.Id;
    	wo.Status__c='处理中';
    	insert wo;
    	
    	Attachment att=new Attachment();
    	att.Name='231';
    	att.Body=Blob.ValueOf('123');
    	att.parentid=wo.Id;
    	insert att;
    	
        // ---------------------新建-----------------------
        PageReference page = new PageReference('/apex/WorkOrderAttachment');
        System.Test.setCurrentPage(page);
        Ctrl_WorkOrderAttachment ipc = new Ctrl_WorkOrderAttachment(new ApexPages.StandardController(wo));
        ipc.email='260232@qq.com';
        ipc.wrapList[0].selected=true;
        ipc.sendPdf();
        ipc.back();
        //ipc.wrapList=;
        
    }
}